Skip to content

Improving midpoint rounding documentation #4485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

SingleAccretion
Copy link
Contributor

@SingleAccretion SingleAccretion commented Jul 8, 2020

Summary

These are the minimum improvements I mentioned in the issue below + some interpolated strings in the code snippet. I would personally be fine with this version of the doc, but there could still be some additions:

  • Add directed modes to the snippet. I decided to leave this one out for now because the snippet is already kind of big, and it would duplicate information already in the "Directed rounding" table.
  • It is not immediately clear that "precision" in the doc's context means "number of decimal places", but I guess there is a reason it's written this way. For reference, the parameter name on Math.Round correctly mentions "fractional digits". This is confusing because, to me at least, "precision" == "number of significant (not fractional) digits".
  • The explanation for the rounding to nearest modes is quite long, but I did not want to shorten without some feedback if this is even desirable (the "for" argument could be that it makes the reader "drown in letters", the "against" is that clarity > brevity).

Should I add anything from the above?

Fixes dotnet/docs#19314
cc @gewarren

@dotnet-bot dotnet-bot added this to the July 2020 milestone Jul 8, 2020
@gewarren gewarren requested a review from tannergooding July 8, 2020 18:26
Co-authored-by: Genevieve Warren <[email protected]>
@gewarren
Copy link
Contributor

gewarren commented Jul 9, 2020

@SingleAccretion Thanks for adding this detail. I'll merge it now!

@gewarren gewarren merged commit f1fb030 into dotnet:master Jul 9, 2020
@SingleAccretion SingleAccretion deleted the Improving-MidpointRounding-documentation branch September 29, 2021 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve System.MidpointRounding documentation
4 participants